home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20000824-20010305 / 000037_news@columbia.edu _Sun Sep 24 05:38:43 2000.msg < prev    next >
Internet Message Format  |  2020-01-01  |  6KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
  3.     by uhaligani.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id FAA26362
  4.     for <kermit.misc@cpunix.cc.columbia.edu>; Sun, 24 Sep 2000 05:38:42 -0400 (EDT)
  5. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  6.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id FAA27658
  7.     for <kermit.misc@watsun.cc.columbia.edu>; Sun, 24 Sep 2000 05:38:42 -0400 (EDT)
  8. Received: (from news@localhost)
  9.     by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id FAA15615
  10.     for kermit.misc@watsun.cc.columbia.edu; Sun, 24 Sep 2000 05:21:31 -0400 (EDT)
  11. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  12. From: <Use-Author-Address-Header@[127.1]>
  13. Subject: kermit/lynx co-ordination notes
  14. Message-ID: <E13d2oS-0002KR-00@dxmcgyver>
  15. Date: Sat, 23 Sep 2000 20:50:48 -0700
  16. Organization: mail2news@nym.alias.net
  17. To: kermit.misc@columbia.edu
  18.  
  19.  
  20. I'm posting this to comp.protocols.kermit.misc & oclug@oclug.org
  21. (Orange County Linux Users Group) to make public some
  22. tips for coordinating Kermit and Lynx, and maybe get some
  23. constructive feedback.  I'm posting to oclug as a prelude
  24. to some possible web pages on use of Lynx, at their web site
  25. or my personal site.
  26.  
  27. 1)  The version of ckermit2.txt that I currently have,
  28. in the section on invoking C-Kermit from your browser (1.3.2),
  29. it states that 'As far as we know, this can be done only at compile time.'
  30. *IF* your version of Lynx is compiled with general External support,
  31. in your /etc/lynx.cfg file there should be some lines like:
  32.  
  33. #***Must be compiled with USE_EXTERNALS to enable EXTERN ***
  34. KEYMAP:.:EXTERN                # Run external program with url
  35. #   or possibly:
  36. KEYMAP:,:EXTERN         # run EXTERNAL with URL.  added by d.e.l.
  37.  
  38.  
  39. Make sure one of these is uncommented (no preceeding '#'), 
  40. or add the lines if necessary.
  41. They should be located in a general set of Keymaps, with a lot of
  42. other similar statements, many, the defaults may be commented out.
  43.  
  44. Later in the file there will be a section called EXTERNAL.
  45.  
  46. There you should have some lines:
  47.  
  48. USE_EXTERNALS:TRUE
  49. EXTERNAL:ftp:wget --passive -P ~/download -q %s &:TRUE
  50. EXTERNAL:http:wget --passive -P ~/download -q %s &:TRUE
  51. EXTERNAL:telnet:kermit -J %s:TRUE
  52. EXTERNAL:iksd:kermit -J %s:1649 :TRUE
  53.  
  54. The only ones needed for running kermit are the 'USE_EXTERNALS:TRUE'
  55. and the lines with 'kermit -J' in them.  The others, I include 
  56. simply to show typical other external programs that could be 
  57. defined.  Again, make sure that there is no preceeding '#' on
  58. the line that would comment it out and render the line inoperative.
  59.  
  60. Now, when you hit return at a focused link, the default behavior of
  61. Lynx will result as typical - for instance if a 'telnet://aztec2.asu.edu'
  62. link the conventional and less capable telnet program will be invoked.
  63. If however, you hit '.' (or whatever you chose in the Keymap statement), 
  64. C-Kermit will be invoked instead.
  65. Similarly, over a http or ftp link, '.' will in the case shown above
  66. invoke the wget program on the http or ftp URL to download the file.
  67. Rather than a binary executable, the program specified by the
  68. EXTERNAL statement can be a shebang script ('#!/path/interpreter'
  69. on line 1), that could present a menu
  70. of options on how to handle the URL it is passed.
  71. This is possible because of how UNIX invokes external programs giving
  72. shebang scripts pretty much equality with binary executables.
  73. (Another possibility might be Frank de Cruz's 'IKSDget' script.)
  74. My personal experience is that the program specification seemed 
  75. sensitve to trailing spaces, so a little bit of experimentation may
  76. be needed.
  77. This can be used to enable Lynx to cope with URL schema it has no
  78. compiled in basis to deal with.  For this reason I speculativly
  79. put the 'IKSD://'  (Internet Kermit Server Daemon) example above.
  80.  
  81. 2)  I frequently run Lynx from kermit using the C-Kermit 7 pty 
  82. capability. Typically this is to automate login to web based email
  83. accounts.  It could also be used to log the browsing session.
  84. Recently I ran into an instance where I was trying
  85. to pass a string with included blanks to lynx on its' startup:
  86.  
  87. .......
  88. set network type pty
  89. ...
  90. set host lynx -parameter='some string'    URL://somewhere.something
  91. ...
  92.  
  93. and lynx interpreted this as 
  94.  
  95. set host lynx -parameter='some string'    URL://somewhere.something
  96.               **************** *******     ************************
  97.  
  98. such that it thought '-parameter'  was being set to "'some",
  99. and a switch "string'"  being included.  I think this is basicly
  100. because Lynx normally depends on the shell it
  101. is invoked from to set up the argv/argc it uses to read the 
  102. command line parameters from.
  103.  
  104. Maybe there is a more elegant way to handle this, but one approach I 
  105. found that worked was to:
  106.  
  107. set host { /bin/bash -c -
  108.   " exec lynx -parameter='some string'    URL://somewhere.something" }
  109.  
  110. invoking bash just long enough to set up the argv/argc input,
  111. before it gets overlaid by Lynx.
  112.                           
  113. Another approach that seems to work is to direct the command line
  114. input to Lynx from standard input:
  115.  
  116. set host {lynx -}
  117. output {-parameter=some string\13}
  118. output {URL://somewhere.something\13}
  119. output {\4}                 #  end of input, ^D
  120.  
  121. Anyway, enough.
  122.  
  123. Regards,
  124. Dallas E. Legan II  /  leganii@surfree.com  /  dallasii@kincyb.com
  125.  
  126. Powered by......Lynx, the Internet at full speed.